package cn.silver.module.oss;

import cn.silver.framework.core.model.DictModel;
import cn.silver.framework.core.utils.StreamUtils;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.List;

/**
 * @author zhouxiaobo
 */

@Getter
@AllArgsConstructor
public enum OssPolicyEnums {
    PUBLIC_POLICY("public","完全公开"),
    PRIVATE_POLICY("private","完全私有"),
    CUSTOM_POLICY("custome","自定义权限")
    ;
    private final String code;
    private final String name;
    public static List<DictModel> getModels() {
        return StreamUtils.toList(Arrays.asList(values()), item -> new DictModel(item.name, item.code));
    }
}
